{
if ( BLKBACK_INVALID_HANDLE != ( handle = pending_handle(idx, i) ) )
{
- unmap[i].host_virt_addr = MMAP_VADDR(idx, i);
+ unmap[i].host_addr = MMAP_VADDR(idx, i);
unmap[i].dev_bus_addr = 0;
unmap[i].handle = handle;
- pending_handle(idx, i) = BLKBACK_INVALID_HANDLE;
+ pending_handle(idx, i) = BLKBACK_INVALID_HANDLE;
invcount++;
}
}
{
struct gnttab_map_grant_ref map;
- map.host_virt_addr = MMAP_VADDR(pending_idx, 0);
+ map.host_addr = MMAP_VADDR(pending_idx, 0);
map.flags = GNTMAP_host_map;
map.ref = blkif_gref_from_fas(req->frame_and_sects[0]);
map.dom = blkif->domid;
goto bad_descriptor;
preq.nr_sects += seg[i].nsec;
- map[i].host_virt_addr = MMAP_VADDR(pending_idx, i);
+ map[i].host_addr = MMAP_VADDR(pending_idx, i);
map[i].dom = blkif->domid;
map[i].ref = blkif_gref_from_fas(fas);
map[i].flags = GNTMAP_host_map;
* must still be notified to the remote driver.
*/
#ifdef CONFIG_XEN_BLKDEV_GRANT
- op.host_virt_addr = blkif->shmem_vaddr;
+ op.host_addr = blkif->shmem_vaddr;
op.handle = blkif->shmem_handle;
op.dev_bus_addr = 0;
BUG_ON(HYPERVISOR_grant_table_op(GNTTABOP_unmap_grant_ref, &op, 1));
#else
{ /* Map: Use the Grant table reference */
struct gnttab_map_grant_ref op;
- op.host_virt_addr = VMALLOC_VMADDR(vma->addr);
+ op.host_addr = VMALLOC_VMADDR(vma->addr);
op.flags = GNTMAP_host_map;
op.ref = ref;
op.dom = domid;
gop = unmap_ops;
while (dc != dp) {
pending_idx = dealloc_ring[MASK_PEND_IDX(dc++)];
- gop->host_virt_addr = MMAP_VADDR(pending_idx);
+ gop->host_addr = MMAP_VADDR(pending_idx);
gop->dev_bus_addr = 0;
- gop->handle = grant_tx_ref[pending_idx];
+ gop->handle = grant_tx_ref[pending_idx];
grant_tx_ref[pending_idx] = GRANT_INVALID_REF;
gop++;
}
/* Packets passed to netif_rx() must have some headroom. */
skb_reserve(skb, 16);
#ifdef CONFIG_XEN_NETDEV_GRANT_TX
- mop->host_virt_addr = MMAP_VADDR(pending_idx);
+ mop->host_addr = MMAP_VADDR(pending_idx);
mop->dom = netif->domid;
mop->ref = txreq.addr >> PAGE_SHIFT;
mop->flags = GNTMAP_host_map | GNTMAP_readonly;
struct gnttab_map_grant_ref op;
int rc;
- op.host_virt_addr = host_virt_addr;
+ op.host_addr = host_virt_addr;
op.dom = (domid_t)dom;
op.ref = ref;
op.flags = flags;
struct gnttab_unmap_grant_ref op;
int rc;
- op.host_virt_addr = host_virt_addr;
+ op.host_addr = host_virt_addr;
op.dev_bus_addr = dev_bus_addr;
op.handle = handle;
/* Bitwise-OR avoids short-circuiting which screws control flow. */
if ( unlikely(__get_user(dom, &uop->dom) |
__get_user(ref, &uop->ref) |
- __get_user(host_virt_addr, &uop->host_virt_addr) |
+ __get_user(host_virt_addr, &uop->host_addr) |
__get_user(dev_hst_ro_flags, &uop->flags)) )
{
DPRINTK("Fault while reading gnttab_map_grant_ref_t.\n");
ld = current->domain;
/* Bitwise-OR avoids short-circuiting which screws control flow. */
- if ( unlikely(__get_user(virt, &uop->host_virt_addr) |
+ if ( unlikely(__get_user(virt, &uop->host_addr) |
__get_user(frame, &uop->dev_bus_addr) |
__get_user(handle, &uop->handle)) )
{
* Returns:
* . -ve: error
* . 1: ok
- * . 0: ok and TLB invalidate of host_virt_addr needed.
+ * . 0: ok and TLB invalidate of host_addr needed.
*
* On success, *pframe contains mfn.
*/
/* Bitwise-OR avoids short-circuiting which screws control flow. */
if ( unlikely(__get_user(dom, &uop->dom) |
__get_user(ref, &uop->ref) |
- __get_user(addr, &uop->host_virt_addr) |
+ __get_user(addr, &uop->host_addr) |
__get_user(dev_hst_ro_flags, &uop->flags)) )
{
DPRINTK("Fault while reading gnttab_map_grant_ref_t.\n");
ld = current->domain;
/* Bitwise-OR avoids short-circuiting which screws control flow. */
- if ( unlikely(__get_user(addr, &uop->host_virt_addr) |
+ if ( unlikely(__get_user(addr, &uop->host_addr) |
__get_user(frame, &uop->dev_bus_addr) |
__get_user(handle, &uop->handle)) )
{
* 1. If GNTPIN_map_for_dev is specified then <dev_bus_addr> is the address
* via which I/O devices may access the granted frame.
* 2. If GNTPIN_map_for_host is specified then a mapping will be added at
- * virtual address <host_virt_addr> in the current address space.
+ * either a host virtual address in the current address space, or at
+ * a PTE at the specified machine address. The type of mapping to
+ * perform is selected through the GNTMAP_contains_pte flag, and the
+ * address is specified in <host_addr>.
* 3. Mappings should only be destroyed via GNTTABOP_unmap_grant_ref. If a
* host mapping is destroyed by other means then it is *NOT* guaranteed
* to be accounted to the correct grant reference!
#define GNTTABOP_map_grant_ref 0
typedef struct gnttab_map_grant_ref {
/* IN parameters. */
- union {
- memory_t pte_addr;
- memory_t host_virt_addr;
- };
+ memory_t host_addr;
domid_t dom;
grant_ref_t ref;
u16 flags; /* GNTMAP_* */
/*
* GNTTABOP_unmap_grant_ref: Destroy one or more grant-reference mappings
- * tracked by <handle>. If <host_virt_addr> or <dev_bus_addr> is zero, that
+ * tracked by <handle>. If <host_addr> or <dev_bus_addr> is zero, that
* field is ignored. If non-zero, they must refer to a device/host mapping
* that is tracked by <handle>
* NOTES:
#define GNTTABOP_unmap_grant_ref 1
typedef struct gnttab_unmap_grant_ref {
/* IN parameters. */
- union {
- memory_t pte_addr;
- memory_t host_virt_addr;
- };
+ memory_t host_addr;
memory_t dev_bus_addr;
u16 handle;
/* OUT parameters. */